package com.wheesper.www.WheesperServer.Services;
import com.wheesper.www.WheesperServer.Net.Session.IOSession;

import ProtocolBuffer.ProtoMessageOuterClass.*;

public class RegisterServices {
	
	public static void handle(IOSession session,SignupMailRequest request) {
		RegisterController.Instance().checkEmailExisted(session, request.getMailAddress());
	}
	
	public static void handle(IOSession session,SignupCaptchaRequest request) {
		RegisterController.Instance().registerApply(session,request.getMailAddress());
	}
	
	public static void handle(IOSession session,SignupInfoRequest request) {
		String email = request.getMailAddress();
		String password = request.getPassword();
		String captcha = request.getCaptcha();
		String nickname = request.getNickname();
		RegisterController.Instance().registering(session, email, password, captcha, nickname);
	}
}
